home *** CD-ROM | disk | FTP | other *** search
/ Complete Linux / Complete Linux.iso / docs / apps / database / postgres / postgre2.z / postgre2 / doc / papers / shared_object_ < prev    next >
Encoding:
Text File  |  1992-08-27  |  56.4 KB  |  1,772 lines

  1. .\"
  2. .\"    To print this paper do the following:
  3. .\"        tbl xxx | troff -me
  4. .\"
  5. .\"
  6. .\"
  7. .ds l] /usr/new/lib/bmac
  8. .\".so \*(l]/bmac.std
  9. .\"    @(#)bmac.std    2.4    10/15/84;
  10. .\" standard format troff commands
  11. .\" citation formatting strings
  12. .ds [[ [
  13. .ds ]] ]
  14. .ds ], ,\|
  15. .ds ]- -
  16. .ds [. " \&
  17. .ds .] .
  18. .ds [, " \&
  19. .ds ,] ,
  20. .ds [? " \&
  21. .ds ?] ?
  22. .ds [: " \&
  23. .ds :] :
  24. .ds [; " \&
  25. .ds ;] ;
  26. .ds [! " \&
  27. .ds !] !
  28. .ds [" " \&
  29. .ds "] \&"
  30. .ds [' " \&
  31. .ds '] '
  32. .ds [< " \&
  33. .ds >]
  34. .\" reference formmating strings
  35. .ds a] " \&
  36. .ds b] , \&
  37. .ds c] , \&
  38. .ds n] "\& and \&
  39. .ds m] "\& and \&
  40. .ds p] .
  41. .\" reference formmating macros
  42. .de s[   \" start reference
  43. .nh
  44. .IP [\\*([F] 5m
  45. ..
  46. .de e[   \" end reference
  47. .[-
  48. ..
  49. .de []   \" start to display collected references
  50. .LP
  51. ..
  52. .de ][   \" choose format
  53. .ie !"\\*([J"" \{\
  54. .    ie !"\\*([V"" .nr t[ 1    \" journal
  55. .    el            .nr t[ 5    \" conference paper
  56. .\}
  57. .el .ie !"\\*([B"" .nr t[ 3    \" article in book
  58. .el .ie !"\\*([R"" .nr t[ 4    \" technical report
  59. .el .ie !"\\*([I"" .nr t[ 2    \" book
  60. .el                .nr t[ 0    \" other
  61. .\\n(t[[
  62. ..
  63. .de 0[   \" other
  64. .s[
  65. .if !"\\*([A"" \\*([A\\c
  66. .if !"\\*([T"" , \\*([T\\c
  67. .if !"\\*([V"" , Vol. \\*([V\\c
  68. .if !"\\*([O"" , \\*([O\\c
  69. .if !"\\*([D"" , \\*([D\\c
  70. \&.
  71. .e[
  72. ..
  73. .de 1[ \" journal article
  74. .s[
  75. .if !"\\*([A"" \\*([A,
  76. .if !"\\*([T""  \\*(lq\\*([T\\*(rq,
  77. \\fI\\*([J \\*([V\\fP\c
  78. .ie !"\\*([N"" , \\*([N
  79. .el  
  80. .if !"\\*([D"" (\\*([D)\c
  81. .if !"\\*([P"" , \\*([P\c
  82. .if !"\\*([I"" , \\*([I\c
  83. \\&.
  84. .if !"\\*([O"" \\*([O.
  85. .e[
  86. ..
  87. .de 2[ \" book
  88. .s[
  89. .ie !"\\*([A"" \\*([A,
  90. .el .if !"\\*([E"" \{\
  91. .       ie \\n([E-1 \\*([E, eds.,
  92. .       el \\*([E, ed.,\}
  93. .if !"\\*([T"" \\fI\\*([T\\fP,
  94. .rm a[
  95. .if !"\\*([I"" .ds a[ \\*([I
  96. .if !"\\*([C"" \{\
  97. .       if !"\\*(a["" .as a[ , \\&
  98. .       as a[ \\*([C\}
  99. .if !"\\*([D"" \{\
  100. .       if !"\\*(a["" .as a[ , \\&
  101. .       as a[ \\*([D\}
  102. \\*(a[.
  103. .if !"\\*([G"" Gov. ordering no. \\*([G.
  104. .if !"\\*([O"" \\*([O.
  105. .e[
  106. ..
  107. .de 3[ \" article in book
  108. .s[
  109. .if !"\\*([A"" \\*([A,
  110. .if !"\\*([T"" \\*(lq\\*([T\\*(rq,
  111. in \\fI\\*([B\\fP\c
  112. .if !"\\*([V"" , vol. \\*([V
  113. .if !~\\*([E~~ \{\
  114. .       ie , \\n([E-1  \\*([E (editors)\c
  115. .       el , \\*([E (editor)\c\}
  116. .if !"\\*([I"" , \\*([I\c
  117. .if !"\\*([C"" , \\*([C\c
  118. .if !"\\*([D"" , \\*([D\c
  119. .if !"\\*([P"" , \\*([P\c
  120. \\&.
  121. .if !"\\*([O"" \\*([O.
  122. .e[
  123. ..
  124. .de 4[ \" report
  125. .s[
  126. .if !"\\*([A"" \\*([A,
  127. .if !~\\*([E~~ \{\
  128. .       ie \\n([E-1 \\*([E, editors.
  129. .       el \\*([E, editor.\}
  130. \&\\*(lq\\*([T\\*(rq,
  131. \\*([R\c
  132. .if !"\\*([G"" \& (\\*([G)\c
  133. .if !"\\*([I"" , \\*([I\c
  134. .if !"\\*([C"" , \\*([C\c
  135. .if !"\\*([D"" , \\*([D\c
  136. \\&.
  137. .if !"\\*([O"" \\*([O.
  138. .e[
  139. ..
  140. .de 5[ \" conference paper
  141. .s[
  142. .if !"\\*([A"" \\*([A,
  143. .if !"\\*([T"" \\*(lq\\*([T\\*(rq,
  144. \\fI\\*([J\\fP,
  145. .if !"\\*([C"" \\*([C,
  146. .if !"\\*([D"" \\*([D\c
  147. .if !"\\*([P"" , \\*([P\c
  148. \\&.
  149. .if !"\\*([O"" \\*([O.
  150. .e[
  151. ..
  152. .de [-   \" clean up after yourself
  153. .rm [A [B [C [D
  154. .rm [E [F [G
  155. .rm [I [J [K
  156. .rm [N [O [P
  157. .rm [R [T
  158. .rm [V [W
  159. ..
  160. .de s[   \" start reference
  161. .nh
  162. .IP [\\*([F] 10n
  163. ..
  164. .nr tp 12
  165. .nr fp 11
  166. .nr sp 14
  167. .nr pp 12
  168. .nr fn 1
  169. .\"    "@(#)bibmac.me    2.2    9/9/83";
  170. .de IP
  171. .ip \\$1 \\$2
  172. ..
  173. .de LP
  174. .lp
  175. ..
  176. .\"    macros for where lists...
  177. .de BL
  178. .ta .25i 1.25i
  179. .in +1.25i
  180. .ti -1.25i
  181. ..
  182. .de NI
  183. .ti -1.25i
  184. ..
  185. .de EL
  186. .in -1.25i
  187. .re
  188. ..
  189. .sz \n(pp
  190. .fo ''%''
  191. .(l C
  192. .sz \n(sp
  193. .b
  194. A Shared Object Hierarchy\u\(dg\d
  195. .sz \n(pp
  196. .\".sp
  197. .\".r 
  198. .\"(Draft printed: \*(td)
  199. .sp
  200. .i
  201. Lawrence A. Rowe
  202. .r
  203. .sp
  204. Computer Science Division - EECS
  205. University of California
  206. Berkeley, CA 94720
  207. .)l
  208. .\"   ***** commands to set-up for conference paper ****
  209. .\".bp
  210. .\" set-up for conference paper printing
  211. .\" set 1.5 lines spacing.
  212. .vs 16
  213. .nr $r \n(.vu/\n(.su
  214. .nr $R \n($r
  215. .\" set margins for conf paper
  216. .\".nr L 4.0i
  217. .\".ll \nLu
  218. .\"   ***** end commands to set-up for conference paper ****
  219. .(f
  220. \(dg This research was supported by the National Science Foundation
  221. under Grant DCR-8507256 and
  222. the Defense Advanced Research Projects Agency (DoD), Arpa
  223. Order No. 4871, monitored by Space and Naval Warfare Systems Command 
  224. under Contract N00039-84-C-0089.
  225. .)f
  226. .sp 2
  227. .(l C
  228. .sz \n(sp
  229. .b Abstract
  230. .)l
  231. .pp
  232. This paper describes the design and proposed implementation
  233. of a shared object hierarchy.
  234. The object hierarchy is stored in a relational database and
  235. objects referenced by an application program are cached
  236. in the program's address space.
  237. The paper describes the database representation for the object
  238. hierarchy and the use of POSTGRES, a next-generation relational
  239. database management system,
  240. to implement object referencing efficiently.
  241. The shared object hierarchy system will be used to implement OBJFADS, 
  242. an object-oriented programming environment for interactive multimedia
  243. database applications, that will be the programming interface to POSTGRES.
  244. .sh 1 "Introduction"
  245. .pp
  246. Object-oriented programming has received much attention recently
  247. as a new way to develop and structure programs 
  248. \*([[GoR83\*(],StB86\*(]].
  249. This new programming paradigm, when coupled with a sophisticated
  250. interactive programming environment executing on a workstation
  251. with a bit-mapped display and mouse, improves programmer
  252. productivity and the quality of programs they produce.
  253. .pp
  254. A program written in an object-oriented language is composed of a collection 
  255. of objects that contain data and procedures.
  256. These objects are organized into an \fIobject hierarchy\fP.
  257. Previous implementations of object-oriented languages have required
  258. each user to have his or her own private object hierarchy.
  259. In other words, the object hierarchy is not shared.
  260. Moreover, the object hierarchy is usually restricted to main memory.
  261. The LOOM system stored object hierarchies in secondary memory\*([<\*([[KaK83\*(]]\*(>],
  262. but it did not allow object sharing.
  263. These restrictions limit the applications to which
  264. this new programming technology can be applied.
  265. .pp
  266. There are two approaches to building a shared object hierarchy 
  267. capable of storing a large number of objects.
  268. The first approach is to build an object data manager
  269. \*([[Afe85\*(],CoM84\*(],Dae85\*(],Dee86\*(],KhV87\*(],MaS86\*(],Tha86\*(]].
  270. In this approach, the data manager stores objects that a program can fetch and
  271. store.
  272. The disadvantage of this approach is that a complete database management
  273. system (DBMS) must be written.
  274. A query optimizer is needed to support object queries (e.g., ``fetch
  275. all \fIfoo\fP objects where field \fIbar\fP is \fIbas\fP'').
  276. Moreover, the optimizer must support the equivalent of 
  277. relational joins because
  278. objects can include references to other objects.
  279. A transaction management system is needed to support shared access
  280. and to maintain data integrity should the software or hardware crash.
  281. Finally, protection and integrity systems are required to control access 
  282. to objects and to maintain data consistency.
  283. These modules taken together account for a large fraction of the code
  284. in a DBMS.
  285. Proponents of this approach argue that some of this functionality
  286. can be avoided.
  287. However, we believe that eventually all of this functionality will be required
  288. for the same reasons that it is required in a conventional database
  289. management system.
  290. .pp
  291. The second approach, and the one we are taking, 
  292. is to store the object hierarchy in a relational
  293. database.
  294. The advantage of this approach is that we do not have to write
  295. a DBMS.
  296. A beneficial side-effect is that programs written in a conventional 
  297. programming language can simultaneously access
  298. the data stored in the object hierarchy.
  299. The main objection to this approach has been that the performance
  300. of existing relational DBMS's has been inadequate.
  301. We believe this problem will be solved by using POSTGRES 
  302. as the DBMS on which to implement the shared hierarchy.
  303. POSTGRES is a next-generation DBMS currently being implemented 
  304. at the University of California, Berkeley
  305. \*([[StR86\*(]].
  306. It has a number of features, including 
  307. data of type procedure, alerters, precomputed procedures and rules,
  308. that can be used to implement the shared object hierarchy efficiently.
  309. .pp
  310. Figure \n(fn shows the architecture of the proposed system.
  311. .(z
  312. .hl
  313. .sp
  314. .sp 5.75i
  315. .sp
  316. .ce
  317. Figure \n(fn. Process architecture.
  318. .hl
  319. .nr fn \n(fn+1
  320. .)z
  321. Each application process is connected to a database process
  322. that manages the shared database.
  323. The application program is presented a conventional view of the
  324. object hierarchy.
  325. As objects are referenced by the program, a run-time system
  326. retrieves them from the database.
  327. Objects retrieved from the database are stored in an object cache 
  328. in the application process so that subsequent references to the 
  329. object will not require another database retrieval.
  330. Object updates by the application are propagated to the database and 
  331. to other processes that have cached the object.
  332. .pp
  333. Other research groups are also investigating this approach
  334. \*([[AbW86\*(],Ane86\*(],KeS86\*(],Mae87\*(],Mey86\*(],Ske86\*(]].
  335. The main difference between our work and the
  336. work of these other groups is the object cache in the application process.
  337. They have not addressed the problem of maintaining cache
  338. consistency when more than one application process is using an object.
  339. Research groups that are addressing the object cache problem
  340. are using different implementation strategies 
  341. that will have different performance characteristics
  342. \*([[KhV87\*(],Kra85\*(],MaS86\*(]].
  343. .pp
  344. This paper describes how the OBJFADS shared object hierarchy
  345. will be implemented using POSTGRES.
  346. The remainder of this paper is organized as follows.
  347. Section 2 presents the object model.
  348. Section 3 describes the database representation for the shared
  349. object hierarchy.
  350. Section 4 describes the design of the object cache including strategies
  351. for improving the performance of fetching objects from the database.
  352. Section 5 discusses object updating and transactions.
  353. Section 6 describes the support for selecting and executing
  354. methods.
  355. And lastly, section 7 summarizes the paper.
  356. .sh 1 "Object Hierarchy Model"
  357. .pp
  358. This section describes the object hierarchy model.
  359. The model is based on the Common Lisp Object System (CLOS) 
  360. \*([[BoK87\*(]] because OBJFADS is being implemented in Common Lisp
  361. \*([[Ste84\*(]].
  362. .pp
  363. An \fIobject\fP can be thought of as a record with named \fIslots\fP.
  364. Each slot has a data type and a default value.
  365. The data type can be a primitive type (e.g., \fIInteger\fP)
  366. or a reference to another object.\**
  367. .(f
  368. \** An object reference is represented by an \fIobject identifier\fP
  369. (\fIobjid\fP) that uniquely identifies the object.
  370. .)f
  371. The type of an object is called the \fIclass\fP of the object. 
  372. Class information (e.g., slot definitions) is represented by another object
  373. called the \fIclass object\fP.\**
  374. .(f
  375. \** The term \fIclass\fP is used ambiguously 
  376. in the literature to refer to the type of an object, 
  377. the object that represents the type (i.e., the class object), and
  378. the set of objects of a specific type.
  379. We will indicate the desired meaning in the surrounding text.
  380. .)f
  381. A particular object is also called an \fIinstance\fP
  382. and object slots are also called \fIinstance variables\fP.
  383. .pp
  384. A class inherits data definitions (i.e., slots) from another class,
  385. called a \fIsuperclass\fP,
  386. unless a slot with the same name is defined in the class.
  387. Figure \n(fn shows a class hierarchy (i.e., type hierarchy) that
  388. defines equipment in an integrated circuit (IC) computer integrated
  389. manufacturing database.\*([<\*([[RoW87\*(]]\*(>].
  390. .(z
  391. .hl
  392. .sp
  393. .sp 4.25i
  394. .sp
  395. .ce
  396. Figure \n(fn: Equipment class hierarchy.
  397. .nr fn \n(fn+1
  398. .hl
  399. .)z
  400. Each class is represented by a labelled node (e.g., \fIObject\fP,
  401. \fIEquipment\fP, \fIFurnace\fP, etc.).
  402. The superclass of each class is indicated by the solid line with
  403. an arrowhead.
  404. By convention, the top of the hierarchy is an object named \fIObject\fP.
  405. In this example, the class \fITylan\fP, 
  406. which represents a furnace produced by a particular vendor,
  407. inherits slots from \fIObject\fP, \fIEquipment\fP, and \fIFurnace\fP.
  408. .pp
  409. As mentioned above, the class is represented by an object.
  410. The type of these class objects is represented by the class named \fIClass\fP.
  411. In other words, they are instances of the class \fIClass\fP.
  412. The \fIInstanceOf\fP relationship is represented by dashed lines in the
  413. figure.
  414. For example, the class object \fIEquipment\fP is an instance of the
  415. class \fIClass\fP.
  416. Given an object, it is possible to determine
  417. the class of which it is an instance.
  418. Consequently, slot definitions and, as described
  419. below, procedures that operate on the object can be looked-up in the
  420. class object.
  421. For completeness, the
  422. type of the class named \fIClass\fP is a class named \fIMetaClass\fP.
  423. .pp
  424. Figure \n(fn shows class definitions for \fIEquipment\fP, \fIFurnace\fP,
  425. and \fITylan\fP.
  426. .nr f1 \n(fn    \" set figure number for use below.
  427. .(z
  428. .hl
  429. .in +10n
  430. .nf
  431. \fBClass\fP\ \fIEquipment\fP
  432. \fBMetaClass\fP \fIClass\fP
  433. \fBSuperclass\fP\ \fIObject\fP
  434. \fBSlots\fP
  435.     Location        \fIPoint\fP
  436.     Picture        \fIBitmap\fP
  437.     DateAcquired    \fIDate\fP
  438.  
  439. \fBClass\fP\ \fIFurnace\fP
  440. \fBMetaClass\fP \fIClass\fP
  441. \fBSuperclass\fP\ \fIEquipment\fP
  442. \fBSlots\fP
  443.     NumberOfTubes    \fIInteger\fP
  444.     MaxTemperature    \fIDegreesCelsius\fP
  445.  
  446. \fBClass\fP\ \fITylan\fP
  447. \fBMetaClass\fP \fIClass\fP
  448. \fBSuperclass\fP\ \fIFurnace\fP
  449. \fBSlots\fP
  450. .in -10n
  451. .sp
  452. .ce
  453. Figure \n(fn: Class definitions for equipment.
  454. .nr fn \n(fn+1
  455. .hl
  456. .)z
  457. The definition of a class specifies the name of the class, the metaclass,
  458. the superclass, and the slots.
  459. The metaclass is specified explicitly because a different metaclass 
  460. is used when the objects in the class are to be stored in the database.
  461. In the example, the class \fITylan\fP inherits all slots 
  462. in \fIFurnace\fP and \fIEquipment\fP (i.e., \fILocation\fP, \fIPicture\fP, 
  463. \fIDateAcquired\fP, \fINumberOfTubes\fP, and \fIMaxTemperature\fP).
  464. .pp
  465. Variables can be defined that are global to all instances
  466. of a class.
  467. These variables, called \fIclass variables\fP, hold data that
  468. represents information about the entire class.
  469. For example, a class variable \fINumberOfFurnaces\fP can be defined
  470. for the class \fIFurnace\fP to keep track of the number of furnaces.
  471. Class variables are inherited just like instance variables except
  472. that inherited class variables refer to the same memory location.
  473. For example, the slot named \fINumberOfFurnaces\fP
  474. inherited by \fITylan\fP and \fIBruce\fP refer to the same variable as
  475. the class variable in \fIFurnace\fP.
  476. .pp
  477. Procedures that manipulate objects, called \fImethods\fP,
  478. take arguments of a specific class (i.e., type).
  479. Methods with the same name can be defined for different classes.
  480. For example, two methods named \fIarea\fP can be defined:
  481. one that computes the area of a \fIbox\fP object and one
  482. that computes the area of a \fIcircle\fP object.
  483. The method executed when a program makes a call
  484. on \fIarea\fP is determined by the class of the argument object.
  485. For example,
  486. .(b
  487. area(x)
  488. .)b
  489. calls the \fIarea\fP method for \fIbox\fP if \fIx\fP is a \fIbox\fP
  490. object or the \fIarea\fP method for \fIcircle\f if it is a \fIcircle\fP
  491. object.
  492. The selection of the method to execute is called
  493. \fImethod determination\fP.
  494. .pp
  495. Methods are also inherited from the superclass of a class unless the
  496. method name is redefined.
  497. Given a function call ``\fIf\|(\|x\|)\|\fP'',
  498. the method invoked is determined by the following algorithm.
  499. Follow the \fIInstanceOf\fP relationship from \fIx\fP to determine
  500. the class of the argument.
  501. Invoke the method named \fIf\fP defined for the class, if it exists.
  502. Otherwise, look for the method in the superclass of the class object.
  503. This search up the superclass hierarchy continues until the method
  504. is found or the top of the hierarchy is reached in which case an error
  505. is reported.
  506. .pp
  507. Figure \n(fn shows some method definitions for \fIFurnace\fP and 
  508. \fITylan\fP.
  509. .(z
  510. .hl
  511. .in +10n
  512. \fBmethod\fP Lock(self: \fIFurnace\fP)
  513.     \ \. \. \.
  514. .sp 0.5v
  515. \fBmethod\fP UnLock(self: \fIFurnace\fP)
  516.     \ \. \. \.
  517. .sp 0.5v
  518. \fBmethod\fP CompileRecipe(self: \fITylan\fP, recipe: \fIText\fP)
  519.     \ \. \. \.
  520. .sp 0.5v
  521. \fBmethod\fP LoadRecipe(self: \fITylan\fP, recipe: \fICode\fP)
  522.     \ \. \. \.
  523. .sp
  524. .in -10n
  525. .ce
  526. Figure \n(fn: Example method definitions.
  527. .nr fn \n(fn+1
  528. .hl
  529. .)z
  530. Furnaces in an IC fabrication facility are potentially
  531. dangerous, so they are locked when they are not in use.
  532. The methods \fILock\fP and \fIUnLock\fP disable and enable the equipment.
  533. These methods are defined for the class \fIFurnace\fP so that all
  534. furnaces will have this behavior.
  535. The argument to these methods is an object representing a furnace.\**
  536. .(f
  537. \** The argument name \fIself\fP was chosen because it
  538. indicates which argument is the object.
  539. .)f
  540. The methods \fICompileRecipe\fP and \fILoadRecipe\fP compile and load
  541. into the furnace code
  542. that, when executed by the furnace, will process the semiconductor wafers
  543. as specified by the recipe text.
  544. These methods are defined on the \fITylan\fP class because they are
  545. different for each vendor's furnace.
  546. With these definitions, the class \fITylan\fP has four methods
  547. because it inherits the methods from \fIFurnace\fP.
  548. .pp
  549. Slot and method definitions can be inherited from more than
  550. one superclass.
  551. For example, the \fITylan\fP class can inherit slots and methods
  552. that indicate how
  553. to communicate with the equipment through a network connection
  554. by including the \fINetworkMixin\fP class in the list of
  555. superclasses.\**
  556. .(f
  557. \** The use of the suffix \fIMixin\fP indicates
  558. that this object defines behavior that is added to or mixed into other
  559. objects.
  560. This suffix is used by convention to make it easier to read and
  561. understand an object hierarchy.
  562. .)f
  563. Figure \n(fn shows the definition of \fINetworkMixin\fP
  564. and the modified definition of \fITylan\fP.
  565. .(z
  566. .hl
  567. .in +10n
  568. \fBClass\fP\ \fINetworkMixin\fP
  569. \fBMetaClass\fP \fIClass\fP
  570. \fBSuperclass\fP\ \fIObject\fP
  571. \fBInstance Variables\fP
  572.     HostName    \fIText\fP
  573.     Device    \fIText\fP
  574. \fBMethods\fP
  575.     SendMessage(self: \fINetworkMixin\fP; msg: \fIMessage\fP)
  576.     ReceiveMessage (self: \fINetworkMixin\fP) \fBreturns\fP \fIMessage\fP
  577.  
  578. \fBClass\fP\ \fITylan\fP
  579. \fBMetaClass\fP \fIClass\fP
  580. \fBSuperclass\fP\ \fIFurnace\fP \fINetworkMixin\fP
  581. \\. \. \.
  582. .in -10n
  583. .sp
  584. .ce
  585. Figure \n(fn: Multiple inheritance example.
  586. .nr fn \n(fn+1
  587. .hl
  588. .)z
  589. With this definition, \fITylan\fP inherits the slots 
  590. and methods from \fINetworkMixin\fP and \fIFurnace\fP.
  591. A name conflict arises if two superclasses define slots or methods
  592. with the same name (e.g., \fIFurnace\fP and \fINetworkMixin\fP
  593. might both have a slot named \fIStatus\fP). 
  594. A name conflict is resolved by inheriting the
  595. definition from the first class that has a definition for the name
  596. in the superclass list.
  597. Inheriting definitions from multiple classes is called 
  598. \fImultiple inheritance\fP.
  599. .sh 1 "Shared Object Hierarchy Database Design"
  600. .pp
  601. The view of the object hierarchy presented to an application
  602. program is one consistent hierarchy.
  603. However, a portion of the hierarchy is actually shared among
  604. all concurrent users of the database.
  605. This section describes how the shared portion of the hierarchy
  606. will be stored in the database.
  607. .pp
  608. Shared objects are created by defining a class with metaclass
  609. \fIDBClass\fP.
  610. All instances of these classes, called \fIshared classes\fP, are 
  611. stored in the database.
  612. A predefined shared class, named \fIDBObject\fP, 
  613. is created at the top of the shared object hierarchy.
  614. The relationship between this class and the other 
  615. predefined classes is shown in figure \n(fn.
  616. All superclasses of a shared object class must be 
  617. shared classes except \fIDBObject\fP.
  618. This restriction is required so that all definitions inherited by a shared
  619. class will be stored in the database.
  620. .(z
  621. .hl
  622. .sp
  623. .sp 3.5i
  624. .sp
  625. .ce
  626. Figure \n(fn: Predefined classes.
  627. .nr fn \n(fn+1
  628. .hl
  629. .)z
  630. .pp
  631. The POSTGRES data model supports attribute inheritance, user-defined
  632. data types, data of type procedure, and rules 
  633. \*([[RoS87\*(],StR86\*(]] which are used by
  634. OBJFADS to create the database representation for shared objects.
  635. System catalogs are defined that maintain information about
  636. shared classes.
  637. In addition, a relation is defined for each 
  638. class that contains a tuple that represents each class instance.
  639. This relation is called the \fIinstance relation\fP.
  640. .pp
  641. OBJFADS maintains four system catalogs to represent shared 
  642. class information:
  643. \fIDBObject\fP, \fIDBClass\fP, \fISUPERCLASS\fP, and \fIMETHODS\fP.
  644. The \fIDBObject\fP relation identifies objects
  645. in the database:
  646. .(b
  647. CREATE DBObject(Instance, Class)
  648. .)b
  649. where
  650. .BL
  651.     Instance    is the \fIobjid\fP of the object.
  652. .NI
  653.     Class    is the \fIobjid\fP of the class object of this
  654. instance.
  655. .EL
  656. This catalog defines attributes that are inherited by all 
  657. instance relations.
  658. No tuples are inserted into this relation (i.e., it represents an
  659. abstract class).
  660. However, all shared objects can be accessed
  661. through it by using transitive closure queries.
  662. For example, the following query retrieves the \fIobjid\fP of all
  663. instances:
  664. .(b
  665. RETRIEVE (DBObject*.Instance)
  666. .)b
  667. The asterisk indicates closure over the relation \fIDBObject\fP
  668. and all other relations that inherit attributes from it.
  669. .pp
  670. POSTGRES maintains a unique identifier for every tuple in the database.
  671. Each relation has a predefined attribute that contains the unique identifier.
  672. While these identifiers are unique across all relations,
  673. the relation that contains the tuple cannot be determined from the identifier.
  674. Consequently, we created our own object identifier (i.e., an \fIobjid\fP)
  675. that specifies the relation and tuple.
  676. A POSTGRES user-defined data type, named \fIobjid\fP, that represents 
  677. this object identifier will be implemented.
  678. \fIObjid\fP values are represented by an identifier for
  679. the instance relation (\fIrelid\fP) and the tuple (\fIoid\fP).
  680. \fIRelid\fP is the unique identifier for the tuple in the POSTGRES
  681. catalog that stores information about database relations (i.e., the
  682. \fIRELATION\fP relation).
  683. Given an \fIobjid\fP, the following query will fetch the specified tuple:
  684. .(b
  685. RETRIEVE (o.all)
  686. FROM o IN \fIrelid\fP
  687. WHERE o.oid = \fIoid\fP
  688. .)b
  689. This query will be optimized so that fetching an object instance will
  690. be very efficient.
  691. .pp
  692. The \fIDBClass\fP relation contains a tuple for each shared class:
  693. .(b
  694. CREATE DBClass(Name, Owner) INHERITS (DBObject)
  695. .)b
  696. This relation has an attribute for the class name (\fIName\fP)
  697. and the user that created the class (\fIOwner\fP).
  698. Notice that it inherits the attributes in \fIDBObject\fP
  699. (i.e., \fIInstance\fP and \fIClass\fP) because DBClass is itself
  700. a shared class.
  701. .pp
  702. The superclass list for a class is represented in the \fISUPERCLASS\fP
  703. relation:
  704. .(b
  705. CREATE SUPERCLASS(Class, Superclass, SeqNum)
  706. .)b
  707. where 
  708. .BL
  709.     Class    is the name of the class object.
  710. .NI
  711.     Superclass    is the name of the parent class object.
  712. .NI
  713.     SeqNum    is a sequence number that specifies the inheritance
  714. order in the case that a class has more than one superclass.
  715. .EL
  716. The superclass relationship is stored in a separate relation
  717. because a class can inherit variables and methods from
  718. more than one parent (i.e., multiple inheritance).
  719. The sequence number is required to implement the name conflict resolution rule.
  720. .pp
  721. Methods are represented in the METHODS relation:
  722. .(b
  723. CREATE METHODS(Class, Name, Source, Binary)
  724. .)b
  725. where
  726. .BL
  727.     Class    is the \fIobjid\fP of the class that defines the method.
  728. .NI
  729.     Name    is the name of the method.
  730. .NI
  731.     Source    is the source code for the method.
  732. .NI
  733.     Binary    is the relocatable binary code for the method.
  734. .EL
  735. Method code is dynamically loaded into the application program as needed.
  736. Method determination and caching are discussed below.
  737. .pp
  738. Object instances are represented by tuples in the instance relation that
  739. has an attribute for each instance variable.
  740. For example, if the classes \fIEquipment\fP, \fIFurnace\fP, 
  741. and \fITylan\fP shown in figure \n(f1 were defined with metaclass 
  742. \fIDBClass\fP, the relations shown in figure \n(fn
  743. would be created in the database.
  744. .(z
  745. .hl
  746. .in +10n
  747. .nf
  748. CREATE Equipment(Location, Picture, DateAcquired)
  749. INHERITS (DBObject)
  750. .sp
  751. CREATE Furnace(NumberOfTubes, MaxTemperature)
  752. INHERITS (Equipment)
  753. .sp
  754. CREATE Tylan()
  755. INHERITS (Furnace)
  756. .in -10n
  757. .fi
  758. .sp
  759. .ce
  760. Figure \n(fn: Shared object relations.
  761. .nr fn \n(fn+1
  762. .hl
  763. .)z
  764. When an OBJFADS application creates an instance of one of these classes, 
  765. a tuple is automatically appended to the appropriate instance relation.
  766. Notice that to create a shared class, the superclass of
  767. \fIEquipment\fP must be changed to \fIDBObject\fP.
  768. .pp
  769. The POSTGRES data model uses the same inheritance conflict rules for attributes
  770. that CLOS uses so attribute inheritance can be implemented in the database
  771. system.
  772. If the rules were different, OBJFADS would have to simulate data 
  773. inheritance in the database or POSTGRES would have to be changed to
  774. allow user-defined inheritance rules as in CLOS.
  775. .pp
  776. Thus far, we have not described how OBJFADS data types (i.e., Common
  777. Lisp data types) are mapped to POSTGRES data types.
  778. Data types will be mapped between the two environments as specified by
  779. type conversion catalogs.
  780. Most programming language interfaces to database systems do not store
  781. type mapping information in the database\*([<\*([[Ale85\*(],Ale78\*(],Ate83\*(],Mye85\*(],RoS79\*(],Sch77\*(]]\*(>].
  782. We are maintaining this information in catalogs so that 
  783. user-defined data types in the database can be mapped to the 
  784. appropriate Common Lisp data type.
  785. .pp
  786. The type mapping information is stored in three catalogs:
  787. \fITYPEMAP\fP, \fIOFTOPG\fP, and \fIPGTOOF\fP.
  788. The \fITYPEMAP\fP catalog specifies a type mapping and procedures 
  789. to convert between the types:
  790. .(b
  791. CREATE TYPEMAP(OFType, PGType, ToPG, ToOF)
  792. .)b
  793. where
  794. .BL
  795.     OFType    is an OBJFADS type.
  796. .NI
  797.     PGType    is a POSTGRES type.
  798. .NI
  799.     ToPG    is a procedure that converts from the OBJFADS type to
  800. the POSTGRES type.
  801. .NI
  802.     ToOF    is a procedure that converts from the POSTGRES type
  803. to the OBJFADS type.
  804. .EL
  805. The table in figure \n(fn shows the mapping for selected Common Lisp types.
  806. .(z
  807. .hl
  808. .TS
  809. center box;
  810. l | l | l
  811. l | l | lw(1.5i).
  812. \fBCommon Lisp    POSTGRES    Description\fP
  813. =
  814. fixnum    int4    4 byte integer.
  815. _
  816. float    float    4 byte floating point number.
  817. _
  818. T{
  819. (simple-array
  820.   string-char)
  821. T}    char[]    Variable length character string.
  822. _
  823. symbol    char[]    T{
  824. .fi
  825. A string that represents the symbol (e.g., ``'x'' for the symbol \fIx\fP).
  826. T}
  827. _
  828. (local) object    char[]    T{
  829. .fi
  830. A string that contains a function call that will recreate the object
  831. when executed.
  832. T}
  833. .TE
  834. .sp
  835. .ce
  836. Figure \n(fn: Data type mapping examples.
  837. .nr fn \n(fn+1
  838. .hl
  839. .)z
  840. Where possible,
  841. Common Lisp values are converted to equivalent POSTGRES types
  842. (e.g., \fIfixnum\fP to \fIint4\fP).
  843. In other cases, the values are converted to a print representation 
  844. when they are stored in the database and
  845. recreated by evaluating the print representation
  846. when they are fetched into the program (e.g., symbols and functions).
  847. We expect over time to build-up a set of user-defined POSTGRES
  848. types that will represent the commonly used Common Lisp types 
  849. (e.g., \fIlist\fP, \fIrandom-state\fP, etc.).
  850. However, we also expect application data structures to be designed
  851. to take advantage of the natural database representation.
  852. For example, it makes more sense to store a list as a separate relation
  853. with a common attribute (e.g., a \fIPO#\fP that joins a purchase order
  854. with the line items it contains)
  855. than as an array of \fIobjid\fP's in the database.
  856. .pp
  857. Class variables are more difficult to represent than class
  858. information and instances variables.
  859. The straightforward approach is to define a relation \fICVARS\fP
  860. that contains a tuple for each class variable:
  861. .(b
  862. CREATE CVARS(Class, Variable, Value)
  863. .)b
  864. where \fIClass\fP and \fIVariable\fP uniquely determine the
  865. class variable and \fIValue\fP represents
  866. the current value of the variable.
  867. This solution requires a union type mechanism 
  868. because the attribute values in different tuples may have different types.
  869. POSTGRES does not support union types because they violate the relational
  870. tenet that all attribute values must have the same type.
  871. .pp
  872. Two other representations for class variables are possible with
  873. POSTGRES.
  874. First, a separate relation can be defined for each class
  875. that contains a single tuple that holds the current values of all 
  876. class variables.
  877. For example, the following relation could be defined for the 
  878. \fIFurnace\fP class:
  879. .(b
  880. FurnaceCVARS(NumberOfFurnaces)
  881. .)b
  882. Unfortunately, this solution introduces representational
  883. overhead (the extra relation) and requires another join to
  884. fetch the slots in an object.
  885. Moreover, it does not take advantage of POSTGRES
  886. features that can be used to update the count automatically.
  887. .pp
  888. The second alternative uses POSTGRES rules. 
  889. A rule can be used to define an attribute value
  890. that appears to the application as if it was stored
  891. \*([[SHH87\*(]].
  892. For example, the following command defines a rule that 
  893. computes the number of furnaces:
  894. .(b
  895. REPLACE ALWAYS Furnace*(
  896.    NumberOfFurnaces = COUNT{Furnace*.Instance})
  897. .)b
  898. A reference to \fIFurnace.NumberOfFurnaces\fP will execute the 
  899. COUNT aggregate to compute the current number of furnaces.
  900. The relation variable \fIFurnace*\fP in the aggregate
  901. specifies that tuples in \fIFurnace\fP and all relations that inherit
  902. data from \fIFurnace\fP (e.g., \fITylan\fP and \fIBruce\fP) are to be counted.
  903. With this representation, the database maintains the correct count.
  904. Notice that the command replaces this value in \fIFurnace*\fP
  905. which causes the rule to be inherited by all relations that inherit
  906. data from \fIFurnace\fP.
  907. The disadvantage of this approach is that the COUNT aggregate
  908. is executed every time the class variable is referenced.
  909. .pp
  910. POSTGRES provides another mechanism that can be used to cache
  911. the answer to this query so that it does not have to be recomputed
  912. each time the variable is referenced.
  913. This mechanism allows the application designer to request that a
  914. rule be evaluated early (i.e., precomputed) and cached in the appropriate
  915. relation.
  916. In other words, the furnace count will be cached in the relations
  917. \fIFurnace\fP, \fITylan\fP, and \fIBruce\fP so that references to
  918. the variable will avoid recomputation.
  919. Updates to \fIFurnace\fP or subclasses of \fIFurnace\fP will cause 
  920. the precomputed value to be invalidated.
  921. POSTGRES will recompute the rule off-line or when the class variable is next
  922. referenced whichever comes first.
  923. .pp
  924. Class variables that are not computable from the database can
  925. be represented by a rule that is assigned the
  926. current value as illustrated in the following command:
  927. .(b
  928. REPLACE ALWAYS Furnace(x = \fIcurrent value\fP)
  929. .)b
  930. Given this definition, a reference to \fIFurnace.x\fP in a 
  931. query will return the current value of the class variable.
  932. The variable is updated by redefining the rule.
  933. We plan to experiment with both the single tuple relation and rule
  934. approaches to determine which provides better performance.
  935. .pp
  936. This section described the object hierarchy model 
  937. and a database design for storing it in a relational
  938. database.
  939. The next section describes the application process object cache
  940. and optimizations to improve the time required to fetch an
  941. object from the database.
  942. .sh 1 "Object Cache Design"
  943. .pp
  944. The object cache must support three functions:
  945. object fetching, object updating, and method determination.
  946. This section describes the design for efficiently accessing objects.
  947. The next section describes the support for object updating and
  948. the section following that describes the support for method determination.
  949. .pp
  950. The major problem with implementing an object hierarchy on
  951. a relational database system is the time required to 
  952. fetch an object.
  953. This problem arises 
  954. because queries must be executed to fetch and update objects
  955. and
  956. because objects are decomposed and stored in several relations 
  957. that must be joined to retrieve it from the database.
  958. Three strategies will be used to speed-up
  959. object fetch time: caching, precomputation, and prefetching.
  960. This section describes how these strategies will be implemented.
  961. .pp
  962. The application process will cache
  963. objects fetched from the database.
  964. The cache will be similar to a conventional Smalltalk run-time
  965. system\*([<\*([[Kae81\*(]]\*(>].
  966. An object index will be maintained 
  967. in main memory to allow the run-time system to determine
  968. quickly if a referenced object is in the cache.
  969. Each index entry will contain an object identifier 
  970. and the main memory address of the object.
  971. All object references, even instance variables that reference other
  972. objects, will use the object identifier assigned
  973. by the database (i.e., the \fIinstance\fP attribute).
  974. These indirect pointers may slow the system down but
  975. they avoid the problem of mapping addresses when objects
  976. are moved between main memory and the database.\**
  977. .(f
  978. \** Most Smalltalk implementations use a similar scheme
  979. and it does not appear to be a bottleneck.
  980. .)f
  981. The object index will be hashed to speed-up object
  982. referencing.
  983. .pp
  984. Object caching can speed-up references to objects that have already
  985. been fetched from the database but it cannot speed-up the time
  986. required to fetch the object the first time it is referenced.
  987. The implementation strategy we will use to solve this problem is
  988. to precompute the memory representation of an object and to cache
  989. it in an OBJFADS catalog:
  990. .(b
  991. CREATE PRECOMPUTED(Objid, ObjRep)
  992. .)b
  993. where
  994. .BL
  995.     Objid    is the object identifier.
  996. .NI
  997.     ObjRep    is the main memory object representation.
  998. .EL
  999. Suppose we are given the function \fIRepObject\fP that takes an
  1000. object identifier and returns the memory representation of the
  1001. object.
  1002. Notice that the memory representation includes class variables
  1003. and data type conversions.
  1004. An application process could execute \fIRepObject\fP and store
  1005. the result back in the \fIPRECOMPUTED\fP relation.
  1006. This approach does not work because
  1007. the precomputed representation must be changed if another process
  1008. updates the object either through an operation on the object or an
  1009. operation on the relation that contains the object.
  1010. For example, a user could run the following query to update the values of
  1011. \fIMaxTemperature\fP in all \fIFurnace\fP objects:
  1012. .(b
  1013. REPLACE Furnace*(MaxTemperature = \fInewvalue\fP)
  1014. .)b
  1015. This update would cause  all \fIFurnace\fP objects
  1016. in \fIPRECOMPUTED\fP to be changed.\**
  1017. .(f
  1018. \** \fIFurnace\fP objects cached in an application process 
  1019. must also be invalidated.
  1020. Object updating, cache consistency, and update propagation are 
  1021. discussed in the next section.
  1022. .)f
  1023. .pp
  1024. A better approach is to have the DBMS process execute \fIRepObject\fP
  1025. and invalidate the cached result when necessary.
  1026. POSTGRES supports precomputed procedure values that can be used to 
  1027. implement this approach.
  1028. Query language commands can be stored as the value of 
  1029. a relation attribute.
  1030. A query that calls \fIRepObject\fP to compute
  1031. the memory representation for the object can be
  1032. stored in \fIPRECOMPUTED.Objrep\fP:
  1033. .(b
  1034. RETRIEVE (MemRep = RepObject($Objid))
  1035. .)b
  1036. \fI$Objid\fP refers to the object identifier of the tuple
  1037. in which this query is stored (i.e., \fIPRECOMPUTED.Objid\fP).
  1038. To retrieve the memory representation for
  1039. the object with \fIobjid\fP ``Furnace-123,'' 
  1040. the following query is executed:
  1041. .(b
  1042. RETRIEVE (object = PRECOMPUTED.ObjRep.MemRep)
  1043. WHERE PRECOMPUTED.objid = ``Furnace-123''
  1044. .)b
  1045. The nested dot notation (\fIPRECOMPUTED.ObjRep.MemRep\fP) accesses values from
  1046. the result tuples of the query stored in \fIObjRep\fP
  1047. \*([[Zan83\*(]].
  1048. The constant ``Furnace-123'' is an external representation for the
  1049. \fIobjid\fP (i.e., the \fIFurnace\fP object with \fIoid\fP 123).
  1050. Executing this query causes \fIRepObject\fP to be called which returns
  1051. the main memory representation of the object.
  1052. .pp
  1053. This representation by itself does not alter the performance of
  1054. fetching an object.
  1055. The performance can be changed by instructing the DBMS to
  1056. precompute the query in \fIObjRep\fP (i.e., to cache
  1057. the memory representation of the object in the \fIPRECOMPUTED\fP
  1058. tuple).
  1059. If this optimization is performed, fetching an object turns 
  1060. into a single relation, restriction query that can be efficiently implemented.
  1061. POSTGRES supports precomputation of query language command
  1062. values similar to the early evaluation of rules described above.\**
  1063. .(f
  1064. \** The POSTGRES server checks that the command does not update the database
  1065. and that any procedures called in the command do not update the database
  1066. so that precomputing the command will not introduce side-effects.
  1067. .)f
  1068. Database values retrieved by the commands will be marked
  1069. so that if they are updated, the cached result can be invalidated.
  1070. This mechanism is described in greater detail elsewhere 
  1071. \*([[Sto86\*(],Sto87\*(]].
  1072. .pp
  1073. The last implementation strategy to speed-up object referencing
  1074. is prefetching.
  1075. The basic idea is to fetch an object into the cache before it is
  1076. referenced.
  1077. The \fIHINTS\fP relation maintains a list of objects that should
  1078. be prefetched when a particular object is fetched:
  1079. .(b
  1080. CREATE HINTS(FetchObject, HintObject, Application)
  1081. .)b
  1082. When an object is fetched from the database by an application 
  1083. (\fIApplication\fP), all \fIHintObject\fP's
  1084. for the \fIFetchObject\fP will be fetched at the same time.
  1085. For example, after fetching an object, the following query can be
  1086. run to prefetch other objects:
  1087. .(b
  1088. RETRIEVE (obj = p.ObjRep.MemRep)
  1089. FROM p IN PRECOMPUTED, h IN HINTS
  1090. WHERE p.Objid = h.HintObject
  1091.   AND h.FetchObject = \fIfetched-object-identifier\fP
  1092.   AND h.Application = \fIapplication-name\fP
  1093. .)b
  1094. This query fetches objects one-at-a-time.
  1095. We will also investigate precomputing collections of objects,
  1096. so called \fIcomposite objects\fP\*([<\*([[StB86\*(]]\*(>].
  1097. The idea is to precompute a memory representation for a composite
  1098. object (e.g., a form or procedure definition that is composed of
  1099. several objects) and retrieve all objects into the cache in one
  1100. request.
  1101. This strategy may speed-up fetching large complex objects with
  1102. many subobjects.
  1103. .pp
  1104. We believe that with these three strategies object
  1105. retrieval from the database can be implemented efficiently.
  1106. Our attention thus far has been focussed on speeding up object
  1107. fetching from the database.
  1108. We will also have to manage the limited memory space in the object
  1109. cache.
  1110. An LRU replacement algorithm will be used to select infrequently
  1111. accessed objects to remove from the cache.
  1112. We will also have to implement a mechanism to ``pin down'' objects
  1113. that are not accessed frequently but which are critical
  1114. to the execution of the system or are time consuming to retrieve. 
  1115. .pp
  1116. This section described strategies to speed-up object fetching.
  1117. The next section discusses object updating.
  1118. .sh 1 "Object Updating and Transactions"
  1119. .pp
  1120. This section describes the run-time support for 
  1121. updating objects.
  1122. Two aspects of object updating are discussed:
  1123. how the database representation of an object is updated 
  1124. (database concurrency and transaction management)
  1125. and how the update is propagated to other application processes that
  1126. have cached the object.
  1127. .pp
  1128. The run-time system in the application process specifies 
  1129. the desired update mode for an object
  1130. when it is fetched from the database into the object cache.
  1131. The system supports four update modes: local-copy, direct-update,
  1132. deferred-update, and object-update.
  1133. Local-copy mode makes a copy of the object in the cache.
  1134. Updates to the object are not propagated to the database and 
  1135. updates by other processes are not propagated to the local copy.
  1136. This mode is provided so that changes are valid only for the 
  1137. current session.
  1138. .pp
  1139. Direct-update mode treats the object as though it were actually
  1140. in the database.
  1141. Each update to the object is propagated immediately to the database.
  1142. In other words, updating an instance variable in an 
  1143. object causes an update query
  1144. to be run on the relation that represents instances of the object.
  1145. A conventional database transaction model is used for these updates.
  1146. Write locks are acquired when the update query is executed and 
  1147. they are released when it finishes (i.e., the update is a 
  1148. single statement transaction).
  1149. Note that read locks are not acquired when an object is fetched into
  1150. the cache.
  1151. Updates to the object made by other processes are propagated to the
  1152. cached object when the run-time system is notified that an update
  1153. has occurred.
  1154. The notification mechanism is described below.
  1155. Direct-update mode is provided so that the application
  1156. can view ``live data.''
  1157. .pp
  1158. Deferred-update mode saves object updates until the application
  1159. explicitly requests that they be propagated to the database.
  1160. A conventional transaction model is used to specify the
  1161. update boundaries.
  1162. A begin transaction operation can be executed for a specific object.
  1163. Subsequent variable accesses will set the appropriate read and write
  1164. locks to ensure transaction atomicity and recoverability.
  1165. The transaction is committed when an end transaction operation is
  1166. executed on the object.
  1167. Deferred-update mode is provided so that the application
  1168. can make several updates atomic.
  1169. .pp
  1170. The last update mode supported by the system is object-update.
  1171. This mode treats all accesses to the object as a single transaction.
  1172. An intention-to-write lock is acquired on the object
  1173. when it is first retrieved from the database.
  1174. Other processes can read the object, but they cannot update it.
  1175. Object updates are propagated to the database when the object is
  1176. released from the cache.
  1177. This mode is provided so that transactions can be expressed
  1178. in terms of the object, not the database representation.
  1179. However, note that this mode may reduce concurrency because
  1180. the entire object is locked while it is in the object
  1181. cache.
  1182. .pp
  1183. Thus far, we have only addressed the issue of propagating updates
  1184. to the database.
  1185. The remainder of this section will describe how updates are
  1186. propagated to other processes that have cached the updated object.
  1187. The basic idea is to propagate updates through the shared database.
  1188. When a process retrieves an object, a database
  1189. alerter\*([<\*([[BuC79\*(]]\*(>] is set on the 
  1190. object that will notify the process when
  1191. it is updated by another process.
  1192. When the alerter is trigger by another process, the process that
  1193. set the alerter is notified.
  1194. The value returned by the alerter to the process that set it
  1195. is the updated value of the object.
  1196. Note that the precomputed value of the object memory representation
  1197. will be invalidated by the update so that it will have to be
  1198. recomputed by the POSTGRES server.
  1199. The advantage of this approach is that the
  1200. process that updates an object does not have to know which processes
  1201. want to be notified when a particular object is updated.
  1202. .pp
  1203. The disadvantages of this approach are that the database must 
  1204. be prepared to handle thousands of alerters and the time and
  1205. resources required to propagate an update may be prohibitive.
  1206. Thousands of alerters are required 
  1207. because each process will define an alerter for
  1208. every object in its cache that uses direct-, deferred-, or object-update mode.
  1209. An alerter is not required for local-copy mode because database
  1210. updates by others are not propagated to the local copy.
  1211. POSTGRES is being designed to support large databases of rules
  1212. so this problem is being addressed.
  1213. .pp
  1214. The second disadvantage is the update propagation overhead.
  1215. The remainder of this section describes two propagated update
  1216. protocols, an alerter protocol and a distributed cache update
  1217. protocol, and compares them.
  1218. Figure \n(fn shows the process structure for the alerter approach.
  1219. .nr f2 \n(fn    \" save figure number for later reference.
  1220. .(z
  1221. .hl
  1222. .sp
  1223. .sp 3.5i
  1224. .sp
  1225. .ce
  1226. Figure \n(fn. Process structure for the alerter approach.
  1227. .hl
  1228. .nr fn \n(fn+1
  1229. .)z
  1230. Each application process (AP) has a database process called its POSTGRES server
  1231. (PS).
  1232. The POSTMASTER process (PM) controls all POSTGRES servers.
  1233. Suppose that AP\di\u updates an object in the database on which M \(<= N
  1234. AP's have set an alerter.
  1235. Figure \n(fn shows the protocol that is executed to propagate the
  1236. updates to the other AP's.
  1237. The cost of this propagated update is:
  1238. .(b
  1239. .ta 0.8i +0.8i
  1240. 2M+1    process-to-process messages
  1241. .sp 0.5v
  1242. \ \ \ \ 1    database update
  1243. .sp 0.5v
  1244. \ \ \ \ 1    catalog query
  1245. .sp 0.5v
  1246. \ \ \ \ 1    object fetch
  1247. .)b
  1248. The object fetch is avoidable if the alerter returns the
  1249. changed value.
  1250. This optimization works for small objects but may not 
  1251. be reasonable for large objects.
  1252. .(z
  1253. .hl
  1254. .in +15n
  1255. .ti -3n
  1256. 1.\ \ AP\di\u updates the database.
  1257. .sp 0.5v
  1258. .ti -3n
  1259. 2.\ \ PS\di\u sends a message to PM indicating 
  1260. which alerters were tripped.
  1261. .sp 0.5v
  1262. .ti -3n
  1263. 3.\ \ PM queries the alerter catalog to determine 
  1264. which PS's set the alerters.
  1265. .sp 0.5v
  1266. .ti -3n
  1267. 4.\ \ PM sends a message to PS\dj\u for each alerter.
  1268. .sp 0.5v
  1269. .ti -3n
  1270. 5.\ \ Each PS\dj\u sends a message to AP\dj\u indicating
  1271. that the alerter has been tripped.
  1272. .sp 0.5v
  1273. .ti -3n
  1274. 6.\ \ Each PS\dj\u refetches the object.
  1275. .in -15n
  1276. .sp
  1277. .ce
  1278. Figure \n(fn. Propagated update protocol for the alerter approach.
  1279. .hl
  1280. .nr fn \n(fn+1
  1281. .)z
  1282. .pp
  1283. The alternative approach to propagate updates is to have the
  1284. user processes signal each other that an update has occurred.
  1285. We call this approach the \fIdistributed cache update\fP
  1286. approach.
  1287. The process structure is similar to that shown in figure \n(f2,
  1288. except that each AP must be able to broadcast a message to
  1289. all other AP's.
  1290. Figure \n(fn shows the distributed cache update protocol.
  1291. .(z
  1292. .hl
  1293. .in +15n
  1294. .ti -3n
  1295. 1.\ \ AP\di\u acquires the update token for the 
  1296. object.
  1297. .sp 0.5v
  1298. .ti -3n
  1299. 2.\ \ AP\di\u updates the database.
  1300. .sp 0.5v
  1301. .ti -3n
  1302. 3.\ \ AP\di\u broadcasts to all AP's that the object
  1303. has been updated.
  1304. .sp 0.5v
  1305. .ti -3n
  1306. 4.\ \ Each AP\dj\u that has the object in its cache 
  1307. refetches it.
  1308. .in -15n
  1309. .sp
  1310. .ce
  1311. Figure \n(fn. Propagated update protocol for the distributed cache approach.
  1312. .fi
  1313. .hl
  1314. .nr fn \n(fn+1
  1315. .)z
  1316. This protocol uses a primary site update protocol.
  1317. If AP\di\u does not have the update token signifying that it
  1318. is the primary site for the object, it sends a broadcast message
  1319. to all AP's requesting the token.
  1320. The AP that has the token sends it to AP\di\u.
  1321. Assuming that AP\di\u does not have the update token,
  1322. the cost of this protocol is:
  1323. .(b
  1324. 2    broadcast messages
  1325. .br
  1326. 1    process-to-process message
  1327. .br
  1328. 1    database update
  1329. .br
  1330. 1    object fetch
  1331. .)b
  1332. One broadcast message and the process-to-process message are
  1333. eliminated if AP\di\u already has the update token.
  1334. The advantage of this protocol is that a multicast protocol can
  1335. be used to implement the broadcast messages in a way that is
  1336. more efficient than sending N process-to-process messages.
  1337. Of course, the disadvantage is that AP's have to examine
  1338. all update signals to determine whether the updated object
  1339. is in its cache.
  1340. .pp
  1341. Assume that the database update and object fetch take the
  1342. same resources in both approaches and that the alerter catalog 
  1343. is cached in main memory so the catalog query does not
  1344. have to read the disk in the alerter approach.
  1345. With these assumptions, the comparison of these two approaches
  1346. comes down to the cost of 2 broadcast messages versus 2M
  1347. process-to-process messages.
  1348. If objects are cached in relatively few AP's (i.e., M << N)
  1349. and broadcast messages are efficient, the distributed cache
  1350. update appears better.
  1351. On the other hand, if M is larger, so the probability of doing
  1352. 2 broadcasts goes up, and broadcasts are inefficient, the alerter
  1353. approach appears better.
  1354. We have chosen the alerter approach because an efficient multicast
  1355. protocol does not exist but the alerter mechanism will exist in
  1356. POSTGRES.
  1357. If this approach is too slow, we will have to tune the alerter
  1358. code or implement the multicast protocol.
  1359. .pp
  1360. This section described the mechanisms for updating shared objects.
  1361. The last operation that the run-time system must
  1362. support is method determination which is discussed in the next
  1363. section.
  1364. .sh 1 "Method Determination"
  1365. .pp
  1366. Method determination is the action taken to select the method to
  1367. be executed when a procedure is called with an object as an argument.
  1368. Conventional object-oriented systems implement a cache
  1369. of recently called methods to speed-up method determination
  1370. \*([[GoR83\*(]].
  1371. The cache is typically a hash table that maps an object
  1372. identifier of the receiving object and a method name to 
  1373. the entry address of the method to be executed.
  1374. If the desired object and method name is not in the table, the standard
  1375. look-up algorithm is invoked.
  1376. In memory resident Smalltalk systems, this strategy has proven to be very 
  1377. good because high hit ratios have been achieved with modest cache sizes 
  1378. (e.g., 95% with 2K entries in the cache)\*([<\*([[Kra83\*(]]\*(>].
  1379. .pp
  1380. We will adapt the method cache idea to a database environment.
  1381. A method index relation will be computed that indicates which
  1382. method should be called for each object class and method name.
  1383. The data will be stored in the \fIDM\fP relation defined 
  1384. as follows:
  1385. .(b
  1386. CREATE DM(Class, Name, DefClass)
  1387. .)b
  1388. where
  1389. .BL
  1390.     Class    is the class of the argument object.
  1391. .NI
  1392.     Name    is the name of the method called.
  1393. .NI
  1394.     DefClass    is the class in which the method is defined.
  1395. .EL
  1396. Given this relation, the binary code for the method to be executed 
  1397. can be retrieved from the database by the following query:
  1398. .(b
  1399. RETRIEVE (m.Binary)
  1400. FROM m IN METHODS, d IN DM
  1401. WHERE m.Class = d.DefClass
  1402.   AND d.Class = \fIargument-class-objid\fP
  1403.   AND d.Name = \fImethod-name\fP
  1404. .)b
  1405. The DM relation can be precomputed for all classes
  1406. in the shared object hierarchy and incrementally updated as the hierarchy is
  1407. modified.
  1408. .pp
  1409. Method code will be cached in the application process so that the
  1410. database will not have to be queried for every procedure call.
  1411. Procedures in the cache will have to be invalidated if
  1412. another process modifies the method definition or the inheritance hierarchy.
  1413. Database alerters will be used to signal object changes that 
  1414. require invalidating cache entries.
  1415. We will also support a check-in/check-out protocol for
  1416. objects so that production programs can isolate their object hierarchy from
  1417. changes being made by application developers\*([<\*([[Kat83\*(]]\*(>].
  1418. .pp
  1419. This section described a shared index that will be used for
  1420. method determination.
  1421. .sh 1 "Summary"
  1422. .pp
  1423. This paper described a proposed implementation of a shared object hierarchy
  1424. in a POSTGRES database.
  1425. Objects accessed by an application program are cached in
  1426. the application process.
  1427. Precomputation and prefetching are used to reduce the
  1428. time to retrieve objects from the database.
  1429. Several update modes were defined that can be used
  1430. to control concurrency.
  1431. Database alerters are used to propagate updates to copies of
  1432. objects in other caches.
  1433. A number of features in POSTGRES will be exploited 
  1434. to implement the system, including: rules,
  1435. POSTQUEL data types, precomputed queries and rules,
  1436. and database alerters.
  1437. .sp 2
  1438. .ne 6
  1439. .(l C
  1440. .sz \n(sp
  1441. .b References
  1442. .)l
  1443. .sp
  1444. .[]
  1445. .[-
  1446. .ds [F AbW86
  1447. .ds [A R\*(p]\*(a]M\*(p] Abarbanel
  1448. .as [A \*(n]M\*(p]\*(a]D\*(p] Williams
  1449. .ds [T A Relational Representation for Knowledge Bases
  1450. .ds [O Unpublished manuscript
  1451. .ds [D Apr. 1986
  1452. .][
  1453. .[-
  1454. .ds [F Afe85
  1455. .ds [A H\*(p] Afsarmanesh
  1456. .as [A \*(n]et.\ al.
  1457. .ds [T An Extensible, Object-Oriented Approach to Databases for VLSI/CAD
  1458. .ds [J Proc. 11th Int. Conf. on VLDB
  1459. .ds [D Aug. 1985
  1460. .][
  1461. .[-
  1462. .ds [F Ale85
  1463. .ds [A A\*(p] Albano
  1464. .as [A \*(n]et.\ al.
  1465. .ds [T Galileo: A Strongly-Typed, Interactive Conceptual Language
  1466. .ds [J ACM Trans. Database Systems
  1467. .ds [D June 1985
  1468. .nr [P 1
  1469. .ds [P 230-260
  1470. .][
  1471. .[-
  1472. .ds [F Ale78
  1473. .ds [A E\*(p] Allman
  1474. .as [A \*(n]et.\ al.
  1475. .ds [T Embedding a Relational Data Sublanguage in a General Purpose Programming Language
  1476. .ds [R Proc. of a Conf.  on Data:  Abstraction, Definition, and Structure, \fISIGPLAN Notices\fR,
  1477. .ds [V 11
  1478. .ds [D Mar. 1978
  1479. .nr [P 1
  1480. .ds [P 25-35 
  1481. .][
  1482. .[-
  1483. .ds [F Ane86
  1484. .ds [A T\*(p] Anderson
  1485. .as [A \*(n]et.\ al.
  1486. .ds [T PROTEUS: Objectifying the DBMS User Interface
  1487. .ds [J Proc. Int. Wkshp on Object-Oriented Database Systems
  1488. .ds [C Asilomar, CA
  1489. .ds [D Sep. 1986
  1490. .][
  1491. .[-
  1492. .ds [F Ate83
  1493. .ds [A M\*(p]\*(a]P\*(p] Atkinson
  1494. .as [A \*(n]et.\ al.
  1495. .ds [T An Approach to Persistent Programming
  1496. .ds [J Computer Journal
  1497. .ds [V 26
  1498. .ds [N 4
  1499. .ds [D 1983
  1500. .nr [P 1
  1501. .ds [P 360-365
  1502. .][
  1503. .[-
  1504. .ds [F BoK87
  1505. .ds [A D\*(p] Bobrow
  1506. .as [A \*(n]G\*(p] Kiczales
  1507. .ds [T Common Lisp Object System Specification
  1508. .ds [R Draft X3 Document 87-001
  1509. .ds [I Am. Nat. Stand. Inst.
  1510. .ds [D February 1987
  1511. .][
  1512. .[-
  1513. .ds [F BuC79
  1514. .ds [A O\*(p]\*(a]P\*(p] Buneman
  1515. .as [A \*(n]E\*(p]\*(a]K\*(p] Clemons
  1516. .ds [T Efficiently Monitoring Relational Databases
  1517. .ds [J ACM Trans. Database Systems
  1518. .ds [D Sep. 1979
  1519. .nr [P 1
  1520. .ds [P 368-382
  1521. .][
  1522. .[-
  1523. .ds [F CoM84
  1524. .ds [A G\*(p] Copeland
  1525. .as [A \*(n]D\*(p] Maier
  1526. .ds [T Making Smalltalk a Database System
  1527. .ds [J Proc. 1984 ACM-SIGMOD Int. Conf. on the Mgt. of Data
  1528. .ds [D June 1984
  1529. .][
  1530. .[-
  1531. .ds [F Dae85
  1532. .ds [A U\*(p] Dayal
  1533. .as [A \*(n]et.al.
  1534. .ds [T A Knowledge-Oriented Database Management System
  1535. .ds [J Proc. Islamorada Conference on Large Scale Knowledge Base and Reasoning Systems
  1536. .ds [D Feb. 1985
  1537. .][
  1538. .[-
  1539. .ds [F Dee86
  1540. .ds [A N\*(p]\*(a]P\*(p] Derrett
  1541. .as [A \*(n]et.al.
  1542. .ds [T An Object-Oriented Approach to Data Management
  1543. .ds [J Proc. 1986 IEEE Spring Compcon
  1544. .ds [D 1986
  1545. .][
  1546. .[-
  1547. .ds [F GoR83
  1548. .ds [A A\*(p] Goldberg
  1549. .as [A \*(n]D\*(p] Robson
  1550. .ds [T Smalltalk-80: The Language and its Implementation
  1551. .ds [I Addison Wesley
  1552. .ds [C Reading, M\&A
  1553. .ds [D May 1983
  1554. .][
  1555. .[-
  1556. .ds [F Kae81
  1557. .ds [A T\*(p] Kaehler
  1558. .ds [T Virtual Memory for an Object-Oriented Language
  1559. .ds [J Byte
  1560. .ds [V 6
  1561. .ds [N 8
  1562. .ds [D Aug. 1981
  1563. .][
  1564. .[-
  1565. .ds [F KaK83
  1566. .ds [A T\*(p] Kaehler
  1567. .as [A \*(n]G\*(p] Krasner
  1568. .ds [T LOOM \- Large Object-Oriented Memory for Smalltalk-80 Systems
  1569. .ds [E G\*(p] Krasner
  1570. .nr [E 1
  1571. .ds [B Smalltalk-80: Bits of History, Words of Advice
  1572. .ds [I Addison Wesley
  1573. .ds [C Reading, M\&A
  1574. .ds [D May 1983
  1575. .][
  1576. .[-
  1577. .ds [F Kat83
  1578. .ds [A R\*(p] Katz
  1579. .ds [T Managing the Chip Design Database
  1580. .ds [J Computer Magazine
  1581. .ds [V 16
  1582. .ds [N 12
  1583. .ds [D Dec. 1983
  1584. .][
  1585. .[-
  1586. .ds [F KeS86
  1587. .ds [A J\*(p] Kempf
  1588. .as [A \*(n]A\*(p] Snyder
  1589. .ds [T Persistent Objects on a Database
  1590. .ds [R Report STL-86-12
  1591. .ds [I Sftw. Tech. Lab., HP Labs
  1592. .ds [D Sep. 1986
  1593. .][
  1594. .[-
  1595. .ds [F KhV87
  1596. .ds [A S\*(p] Khoshanfian
  1597. .as [A \*(n]P\*(p] Valduriez
  1598. .ds [T Sharing, Persistence, and Object Orientation: A Database Perspective
  1599. .ds [R DB-106-87
  1600. .ds [I MCC
  1601. .ds [D Apr. 1987
  1602. .][
  1603. .[-
  1604. .ds [F Kra85
  1605. .ds [A G\*(p]\*(a]L\*(p] Krablin
  1606. .ds [T Building Flexible Multilevel Transactions in a Distributed Persistent Environment
  1607. .ds [R Persistence and Data Types, Papers for the Appin Workshop
  1608. .ds [I U. of Glasgow
  1609. .ds [D Aug. 1985
  1610. .][
  1611. .[-
  1612. .ds [F Kra83
  1613. .ds [E G\*(p] Krasner
  1614. .nr [E 1
  1615. .ds [T Smalltalk-80: Bits of History, Words of Advice
  1616. .ds [I Addison Wesley
  1617. .ds [C Reading, M\&A
  1618. .ds [D May 1983
  1619. .][
  1620. .[-
  1621. .ds [F MaS86
  1622. .ds [A D\*(p] Maier
  1623. .as [A \*(n]J\*(p] Stein
  1624. .ds [T Development of an Object-Oriented DBMS
  1625. .ds [J Proc. 1986 ACM OOPSLA Conf.
  1626. .ds [C Portland, OR
  1627. .ds [D Sep. 1986
  1628. .][
  1629. .[-
  1630. .ds [F Mae87
  1631. .ds [A F\*(p] Maryanski
  1632. .as [A \*(n]et.al.
  1633. .ds [T The Data Model Compiler: a Tool for Generating Object-Oriented Database Systems
  1634. .ds [R Unpublished manuscript
  1635. .ds [I Elect. Eng. Comp. Sci. Dept., Univ. of Connecticut
  1636. .ds [D 1987
  1637. .][
  1638. .[-
  1639. .ds [F Mey86
  1640. .ds [A N\*(p] Meyrowitz
  1641. .ds [T Intermedia: The Architecture and Construction of an Object-Oriented Hypermedia System and Applications Framework
  1642. .ds [J Proc. 1986 ACM OOPSLA Conf.
  1643. .ds [C Portland, OR
  1644. .ds [D Sep. 1986
  1645. .nr [P 1
  1646. .ds [P 186-201
  1647. .][
  1648. .[-
  1649. .ds [F Mye85
  1650. .ds [A J\*(p] Mylopoulos
  1651. .as [A \*(n]et.\ al.
  1652. .ds [T A Language Facility for Designing Interactive Database-Intensive Systems
  1653. .ds [J ACM Trans. Database Systems
  1654. .ds [V 10
  1655. .ds [N 4
  1656. .ds [D Dec. 1985
  1657. .][
  1658. .[-
  1659. .ds [F RoS79
  1660. .ds [A L\*(p]\*(a]A\*(p] Rowe
  1661. .as [A \*(n]K\*(p]\*(a]A\*(p] Shoens
  1662. .ds [T Data Abstraction, Views, and Updates in Rigel
  1663. .ds [J Proc. 1979 ACM-SIGMOD Int. Conf. on the Mgt. of Data
  1664. .ds [C Boston, MA
  1665. .ds [D May 1979
  1666. .][
  1667. .[-
  1668. .ds [F RoS87
  1669. .ds [A L\*(p]\*(a]A\*(p] Rowe
  1670. .as [A \*(n]M\*(p]\*(a]R\*(p] Stonebraker
  1671. .ds [T The POSTGRES Data Model
  1672. .ds [R to appear in \fIProc. 13th VLDB Conf.\fP
  1673. .ds [C Brighton, England
  1674. .ds [D Sep. 1987
  1675. .][
  1676. .[-
  1677. .ds [F RoW87
  1678. .ds [A L\*(p]\*(a]A\*(p] Rowe
  1679. .as [A \*(n]C\*(p]\*(a]B\*(p] Williams
  1680. .ds [T An Object-Oriented Database Design for Integrated Circuit Fabrication
  1681. .ds [R submitted for publication
  1682. .ds [D Apr. 1987
  1683. .][
  1684. .[-
  1685. .ds [F Sch77
  1686. .ds [A J\*(p] Schmidt
  1687. .ds [T Some High Level Language Constructs for Data of Type Relation
  1688. .ds [J ACM Trans. Database Systems
  1689. .ds [V 2
  1690. .ds [N 3
  1691. .ds [D Sep. 1977
  1692. .nr [P 1
  1693. .ds [P 247-261
  1694. .][
  1695. .[-
  1696. .ds [F Ske86
  1697. .ds [A A\*(p]\*(a]H\*(p] Skarra
  1698. .as [A \*(n]et.\ al.
  1699. .ds [T An Object Server for an Object-Oriented Database System
  1700. .ds [J Proc. Int. Wkshp on Object-Oriented Database Systems
  1701. .ds [C Asilomar, CA
  1702. .ds [D Sep. 1986
  1703. .][
  1704. .[-
  1705. .ds [F Ste84
  1706. .ds [A G\*(p]\*(a]L\*(p] Steele
  1707. .ds [T Common Lisp - The Language
  1708. .ds [I Digital Press
  1709. .ds [D 1984
  1710. .][
  1711. .[-
  1712. .ds [F StB86
  1713. .ds [A M\*(p] Stefik
  1714. .as [A \*(n]D\*(p]\*(a]G\*(p] Bobrow
  1715. .ds [T Object-Oriented Programming: Themes and Variations
  1716. .ds [J The AI Magazine
  1717. .ds [V 6
  1718. .ds [N 4
  1719. .ds [D Winter 1986
  1720. .nr [P 1
  1721. .ds [P 40-62
  1722. .][
  1723. .[-
  1724. .ds [F StR86
  1725. .ds [A M\*(p]\*(a]R\*(p] Stonebraker
  1726. .as [A \*(n]L\*(p]\*(a]A\*(p] Rowe
  1727. .ds [T The Design of POSTGRES
  1728. .ds [J Proc. 1986 ACM-SIGMOD Int. Conf. on the Mgt. of Data
  1729. .ds [D June 1986
  1730. .][
  1731. .[-
  1732. .ds [F Sto86
  1733. .ds [A M\*(p]\*(a]R\*(p] Stonebraker
  1734. .ds [T Object Management in POSTGRES Using Procedures
  1735. .ds [J Proc. Int. Wkshp on Object-Oriented Database Systems
  1736. .ds [C Asilomar, CA
  1737. .ds [D Sep. 1986
  1738. .][
  1739. .[-
  1740. .ds [F Sto87
  1741. .ds [A M\*(p]\*(a]R\*(p] Stonebraker
  1742. .ds [T Extending a Relational Data Base System with Procedures
  1743. .ds [R to appear \fIACM TOD\fP
  1744. .ds [D 1987
  1745. .][
  1746. .[-
  1747. .ds [F SHH87
  1748. .ds [A M\*(p]\*(a]R\*(p] Stonebraker
  1749. .as [A \*(c]E\*(p] Hanson
  1750. .as [A \*(m]C\*(p]\*(a]H\*(p] Hong
  1751. .ds [T The Design of the POSTGRES Rules System
  1752. .ds [J IEEE Conference on Data Engineering
  1753. .ds [D Feb. 1987
  1754. .ds [C Los Angeles, CA
  1755. .][
  1756. .[-
  1757. .ds [F Tha86
  1758. .ds [A S\*(p]\*(a]M\*(p] Thatte
  1759. .ds [T Persistent memory: A Storage Architecture for Object-Oriented Database Systems
  1760. .ds [J Proc. Int. Wkshp on Object-Oriented Database Systems
  1761. .ds [C Asilomar, CA
  1762. .ds [D Sep. 1986
  1763. .][
  1764. .[-
  1765. .ds [F Zan83
  1766. .ds [A C\*(p] Zaniola
  1767. .ds [T The Database Language GEM
  1768. .ds [J Proc. 1983 ACM-SIGMOD Conference on Management of Data
  1769. .ds [C San Jose, CA.
  1770. .ds [D May 1983
  1771. .][
  1772.